import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { RefEntityDetailComponent } from '../../core';
import { TenantDto } from '../proxy';

@Component({
  selector: 'app-ref-tenant-detail',
  templateUrl: './ref-tenant-detail.component.html',
})
export class RefTenantDetailComponent
  extends RefEntityDetailComponent<TenantDto>
  implements OnInit
{
  constructor(public fb: FormBuilder, public modalRef: NzModalRef) {
    super(fb, modalRef);
  }

  ngOnInit(): void {
    this.validateForm = this.fb.group({
      name: [this.model?.name, [Validators.required]],
    });
  }
}
